package com.elh.jvm.rtda;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class Frame {

    /**
     * 当前栈帧
     *
     */
    private Frame lower;

    /**
     * 局部变量表
     *
     */
    private LocalVars localVars;

    /**
     * 操作数栈
     *
     */
    private OperandStack operandStack;

    /**
     * 当前线程
     *
     */
    private Thread thread;

    /**
     * 指针地址
     *
     */
    private int nextPc;

    public Frame(Thread thread, int maxLocals, int maxStack) {
        this.thread = thread;
        this.localVars = new LocalVars(maxLocals);
        this.operandStack = new OperandStack(maxStack);
    }

}
